//
//  TextViewCell.m
//  Maintenance
//
//  Created by tox on 2017/9/17.
//  Copyright © 2017年 com.kaopudian. All rights reserved.
//

#import "TextViewCell.h"

@interface TextViewCell ()<UITextViewDelegate>

@end

@implementation TextViewCell



- (void)awakeFromNib{
    [super awakeFromNib];
    self.textView.delegate = self;
}

- (instancetype)initWithCoder:(NSCoder *)coder
{
    self = [super initWithCoder:coder];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        self.userInteractionEnabled = YES;
        self.accessoryView = nil;
        self.editingAccessoryView = nil;
        self.shouldIndentWhileEditing = NO;
        self.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    return self;
}
- (void)textViewDidChange:(UITextView *)textView{
    if (self.changeTextBlock) {
        self.changeTextBlock(textView);
    }
}

+ (instancetype)cellWithTableView:(UITableView *)tableView{
    static NSString *cellID = @"TextViewCell";
    TextViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
    if (!cell) {
        cell = [[NSBundle mainBundle]loadNibNamed:cellID owner:self options:nil].lastObject;
    }
    return cell;
}

@end
